//	@file Version: 1.0
//	@file Author: Mindsaver
if(!X_Server) exitWith {};
private ["_pos","_type","_num"];
for "_i" from 1 to 14 do
{
_pos = getMarkerPos format ["object_%1", _i];

_civilianVehicles = ["c_offroad","B_Quadbike_F", "O_Quadbike_F"] call BIS_fnc_selectRandom;
_militaryVehicles = ["c_offroad","O_Galkin_MG_F","B_Hunter_HMG_F"]call BIS_fnc_selectRandom;
_armedMilitaryVehicles = [  "B_Hunter_RCWS_F",
                             "B_Hunter_HMG_F",
                            "O_Galkin_F",
                            "O_Galkin_GMG_F"]call BIS_fnc_selectRandom;


_num = floor (random 100);
	if (_num < 100) then {_type = 0;};
	if (_num < 35) then {_type = 1;};
	if (_num < 10) then {_type = 2;};

if (_type == 0) then {_car = createVehicle [_civilianVehicles,_pos,[], 30,"None"];};
if (_type == 1) then {_car = createVehicle [_militaryVehicles,_pos,[], 30,"None"];};
if (_type == 2) then {_car = createVehicle [_armedMilitaryVehicles,_pos,[], 30,"None"];};

	_car setVehicleInit "nul=[this, 20, 600, 0, false] execVM 'server\vehicle.sqf'";
	processInitCommands;
    
	//Clear Cars Inventory
    clearMagazineCargoGlobal _car;
    clearWeaponCargoGlobal _car;

	//Set Cars Attributes
    _car setFuel (0.50);
    _car setDamage (random 0.50);
    _car setDir (random 360);
	_car disableTIEquipment true;

    _car setpos [getpos _car select 0,getpos _car select 1,0];
	_car setVehicleInit "nul=[this, 10, 20, 0, false] execVM 'server\vehicle.sqf'";
	processInitCommands;
	processInitCommands;
    
	//Clear Cars Inventory
    clearMagazineCargoGlobal _car;
    clearWeaponCargoGlobal _car;

	//Set Cars Attributes
    _car setFuel (0.50);
    _car setDamage (random 0.50);
    _car setDir (random 360);
    _car setPosATL [getpos _car select 0,getpos _car select 1,0];
};

